//
//  ReadArticleRootClass.m
//  __PRODUCTNAME__
//
//  Created by li cheng on 16/09/02
//  Copyright (c) __ORGANIZATIONNAME__. All rights reserved.
//

#import "ReadArticleRootClass.h"
#import "ReadArticleData.h"

@implementation ReadArticleRootClass

+ (NSDictionary *)objectClassInArray{
    return @{@"data" : [ReadArticleData class]};
}

- (void)setValue:(id)value forKey:(NSString *)key{
    [super setValue:value forKey:key];
    
    if ([key isEqualToString:@"data"]) {
        NSMutableArray<ReadArticleData *> *mArrayOfReadArticle = [NSMutableArray array];
        for (NSDictionary *dic in _data) {
            ReadArticleData *readArticleData = [ReadArticleData modelDic:dic];
            [mArrayOfReadArticle addObject:readArticleData];
        }
        _data = mArrayOfReadArticle;
    }
}
@end
